package com.demo.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.business.base.BaseRepository;
import com.demo.po.DemoBean;
@Repository("demoDao")
public class DemoDao extends BaseRepository<DemoBean> {
	/**
	 * 保存
	 * @param map
	 */
	public void save(Map<String,Object> map){
		this.save("com.gavin.web.demo.save",map);
	}
	/**
	 * 删除
	 * @param map
	 */
	public void delete(Map<String,Object> map){
		this.delete("com.gavin.web.demo.delete",map);
	}
	/**
	 * 编辑
	 * @param map
	 */
	public void update(Map<String,Object> map){
		this.update("com.gavin.web.demo.update",map);
	}
	/**
	 * 列表
	 * @param map
	 */
	public List<Map<String,Object>> listEntityMap(Map<String,Object> map){
		return this.selectList("com.gavin.web.demo.listEntityMap",map);
	}
	/**
	 * 根据ID获取实例
	 * @param map
	 * @return
	 */
	public Map<String,Object> getEntity(String id){
		return this.selectOne("com.gavin.web.demo.getEntity",id);
	}
}
